/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Menu.java
 *
 * Created on 25/05/2011, 22:46:08
 */

package alocador.GUI;

/**
 *
 * @author daniel
 */
public class Menu extends javax.swing.JFrame {

    /** Creates new form Menu */
    public Menu() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        botaoCriarEvento = new javax.swing.JButton();
        botaoCriarSala = new javax.swing.JButton();
        botaoAlocarEvento = new javax.swing.JButton();
        botaoDesalocarEvento = new javax.swing.JButton();
        botaoLocalizarEvento = new javax.swing.JButton();
        botaoCancelarEvento = new javax.swing.JButton();
        botaoCancelarSala = new javax.swing.JButton();
        botaoSairSo = new javax.swing.JButton();

        jButton1.setText("jButton1");

        jButton2.setText("jButton2");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        botaoCriarEvento.setText("Criar Evento");
        botaoCriarEvento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoCriarEventoActionPerformed(evt);
            }
        });

        botaoCriarSala.setText("Criar Sala");
        botaoCriarSala.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoCriarSalaActionPerformed(evt);
            }
        });

        botaoAlocarEvento.setText("Alocar Evento");

        botaoDesalocarEvento.setText("Desalocar Evento");

        botaoLocalizarEvento.setText("Localizar Evento");
        botaoLocalizarEvento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoLocalizarEventoActionPerformed(evt);
            }
        });

        botaoCancelarEvento.setText("Cancelar Evento");
        botaoCancelarEvento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoCancelarEventoActionPerformed(evt);
            }
        });

        botaoCancelarSala.setText("Cancelar Sala");

        botaoSairSo.setText("Sair");
        botaoSairSo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoSairSoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(341, Short.MAX_VALUE)
                .addComponent(botaoSairSo)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addGap(43, 43, 43)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(botaoLocalizarEvento, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(botaoDesalocarEvento, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE)
                            .addComponent(botaoAlocarEvento, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE)
                            .addComponent(botaoCriarEvento, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(botaoCancelarSala, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(botaoCancelarEvento, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(botaoCriarSala, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(58, 58, 58))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botaoCriarEvento)
                    .addComponent(botaoCriarSala))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botaoAlocarEvento)
                    .addComponent(botaoCancelarSala))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botaoCancelarEvento)
                    .addComponent(botaoDesalocarEvento))
                .addGap(18, 18, 18)
                .addComponent(botaoLocalizarEvento)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE)
                .addComponent(botaoSairSo)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botaoCriarSalaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoCriarSalaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_botaoCriarSalaActionPerformed

    private void botaoCriarEventoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoCriarEventoActionPerformed
        new CriarEvento().setVisible(true);
        dispose();
    }//GEN-LAST:event_botaoCriarEventoActionPerformed

    private void botaoLocalizarEventoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoLocalizarEventoActionPerformed
        new LocalizaEvento().setVisible(true);
        dispose();
    }//GEN-LAST:event_botaoLocalizarEventoActionPerformed

    private void botaoSairSoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoSairSoActionPerformed
        System.exit(0);
    }//GEN-LAST:event_botaoSairSoActionPerformed

    private void botaoCancelarEventoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoCancelarEventoActionPerformed
        new CancelarEvento().setVisible(true);
        dispose();
    }//GEN-LAST:event_botaoCancelarEventoActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Menu().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botaoAlocarEvento;
    private javax.swing.JButton botaoCancelarEvento;
    private javax.swing.JButton botaoCancelarSala;
    private javax.swing.JButton botaoCriarEvento;
    private javax.swing.JButton botaoCriarSala;
    private javax.swing.JButton botaoDesalocarEvento;
    private javax.swing.JButton botaoLocalizarEvento;
    private javax.swing.JButton botaoSairSo;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    // End of variables declaration//GEN-END:variables

}
